#import <UIKit/UIKit.h>

#undef ABS
#undef MIN
#undef MAX

#include "mupdf/fitz.h"

#import "NVAHitView.h"
#import "NVAPageView.h"
#import "NVADocRef.h"
#import "NVADialogCreator.h"
#import "NVATextSelectView.h"
#import "NVAInkView.h"
#import "NVAAnnotSelectView.h"
#import "NVAUpdater.h"
#import "SelectTextDelegate.h"
@interface NVAPageViewNormal : UIScrollView <UIScrollViewDelegate,NVAPageView,SelectTextDelegate>
{
	NVADocRef *docRef;
	fz_document *doc;
	fz_page *page;
	fz_display_list *page_list;
	fz_display_list *annot_list;
	int number;
	UIActivityIndicatorView *loadingView;
	fz_pixmap *image_pix;
	CGDataProviderRef imageData;
	UIImageView *imageView;
	fz_pixmap *tile_pix;
	CGDataProviderRef tileData;
	UIImageView *tileView;
	NVAHitView *hitView;
	NVAHitView *linkView;
	NVATextSelectView *textSelectView;
	NVAInkView *inkView;
	NVAAnnotSelectView *annotSelectView;
	NSArray *widgetRects;
	NSArray *annotations;
	int selectedAnnotationIndex;
	CGSize pageSize;
	CGRect tileFrame;
	float tileScale;
	BOOL cancel;
	id<NVADialogCreator> dialogCreator;
	id<NVAUpdater> updater;
    id<SelectTextDelegate> text_delegate;
}
- (id) initWithFrame: (CGRect)frame dialogCreator:(id<NVADialogCreator>)dia updater:(id<NVAUpdater>)upd document: (NVADocRef *)aDoc page: (int)aNumber;
- (void) displayImage: (UIImage*)image;
- (void) resizeImage;
- (void) loadPage;
- (void) loadTile;
-(void) copyText;
- (NSUInteger)colorCode: (UIColor*)color;
-(UIColor*)colorDecode:(int) color;
@end
